package com.shopping.mall.core.module.saleData.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shopping.mall.base.excel.converter.TimestampConverter;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

/**
 * SaleData实体类
 *
 * @author zzy
 * @date 2021-09-01
 */
@Data
@TableName("sale_data")
public class SaleData {

public interface insert {
}

public interface update {
}

    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId(type = IdType.UUID)
    private String id;

    @ExcelProperty(value = "日期",converter = TimestampConverter.class)
    @ApiModelProperty(value = "日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp date;

    @ExcelProperty("已订购商品销售额")
    @ApiModelProperty(value = "已订购商品销售额")
    private double orderSale;

    @ExcelProperty("订购商品数量")
    @ApiModelProperty(value = "订购商品数量")
    private int goodsNum;

    @ExcelProperty("订单数量")
    @ApiModelProperty(value = "订单数量")
    private int orderNum;

    @ExcelProperty("页面浏览量")
    @ApiModelProperty(value = "页面浏览量")
    private int pageViews;

    @ExcelProperty("访问量")
    @ApiModelProperty(value = "访问量")
    private int visitNum;

    @ExcelProperty("访问率")
    @ApiModelProperty(value = "转化率")
    private double convertRate;

    @ExcelProperty("已退款商品数量")
    @ApiModelProperty(value = "已退款商品数量")
    private int refundGoodsNum;

    @ExcelProperty("退款率")
    @ApiModelProperty(value = "退款率")
    private double refundRate;

    @ExcelProperty("已发货商品销售额")
    @ApiModelProperty(value = "已发货商品销售额")
    private double deliverSale;

    @ExcelProperty("已发货商品数量")
    @ApiModelProperty(value = "已发货商品数量")
    private int deliverGoodsNum;

    @ExcelProperty("已发货订单数量")
    @ApiModelProperty(value = "已发货订单数量")
    private int deliverOrderNum;


}
